package com.gddb.xwj.member.service.impl;

import com.gddb.xwj.common.api.BaseApiService;
import com.gddb.xwj.member.feign.WeixinServiceFeign;
import com.gddb.xwj.member.service.MemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @Author xuwj
 * @Description:
 * 1、feign调用方式一
 * 2、Qualifier指定具体的实现类
 * @CreateTime 2020/5/10 21:17
 * @Version 1.0
 */
@RestController
public class MemberServiceImpl extends BaseApiService implements MemberService {
    @Autowired
    private WeixinServiceFeign weixinServiceFeign;
    @Override
    public Map<String, Object> getAppByWeixin() {
        return weixinServiceFeign.getApp();
    }

    @Override
    public Map<String, Object> getTestRibbon() {
        for(int i =1 ; i<10 ; i ++){
            weixinServiceFeign.getTestRibbon(i);
        }
        return setResultSuccess();
    }
}
